<template>
    <div class="list" :style="{ width }">
        <div v-for="item in list"> {{ item.title }}</div>
    </div>
</template>

<script>
export default {
    props: {
        list: {
            default: [],
            type: Array
        },
        width: {
            default: '0px',
            type: String
        },
    }
}

</script>

<style  lang="scss">
.list {
    position: absolute;
    top: 50px;
    left: 0;
    z-index: 100000;
    background-color: #fff;

    line-height: 40px;
    padding: 0 8px;
    color: #666;
    box-shadow: 0 0 20px rgba(0, 0, 0, .1);

    div {
        display: block;
        padding: 0;
        text-align: center;
        border-bottom: 1px solid #f6f6f6;
        cursor: pointer;
    }
}
</style>